<?php
/**
 * Copyright (c) 2013 pipapai.com
 */

JLoader::register('ProvinceHelper', JPATH_SITE.'/components/com_city/helper.php');
class PCityController {

   public static function listp() {
      OC_JSON::setContentTypeHeader();
      $countryid = JRequest::getInt('c', 1); // default to China 
      echo ProvinceHelper::displayProvince($countryid, false);
      exit();
   }

   public static function listc() {
      OC_JSON::setContentTypeHeader();
      $provinceid = JRequest::getInt('p', 10000); // default to Beijing
      echo ProvinceHelper::displayCity($provinceid, false);
      exit();
   }

   public static function listm() {
      OC_JSON::setContentTypeHeader();
      $provinceid = JRequest::getInt('value', 10000); // default to Beijing
      echo ProvinceHelper::displayCityM($provinceid, false);
      exit();
   }
}


